@charset 'UTF-8';

:root {
    --primary-gradient: linear-gradient(135deg, #4c7aee, #ee3fab);
    --nav-width: 52px;
    --card-radius: 12px;
    --transition-speed: 0.3s;
    --white-80: rgba(255, 255, 255, 0.8);
    --white-90: rgba(255, 255, 255, 0.9);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'PingFang SC', system-ui, sans-serif;
}

body {
    background: var(--primary-gradient);
    color: #1a1a1a;
    min-height: 100vh;
    overflow: hidden;
    line-height: 1.5;
    user-select: none;
    padding-left: 52px;
}

/* 时间显示样式 */
.time-display {
    color: white;
    text-align: center;
    margin: 40px 0;
    text-shadow: var(--shadow-sm);
}

.time-hms {
    font-size: 6rem;
    font-weight: bold;
    letter-spacing: -2px;
    margin-bottom: 0.2rem;
}

.time-date {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* 名人名言 */
.quotes {
    font-size: 1rem;
    color: #444;
    text-align: center;
    margin-top: 2rem;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* 搜索框容器 */
.search-box {
    display: flex;
    width: min(720px, 90%);
    margin: 0 auto 2rem;
    position: relative;
    opacity: 0;
    transition: opacity 0.2s;
}

body.loaded .search-box {
    opacity: 1;
}

.search-engine {
    display: flex;
    align-items: center;
    padding: 0 0.3rem 0 1.2rem;
    cursor: pointer;
    background: var(--white-80);
    border-radius: 2rem 0 0 2rem;
    transition: all var(--transition-speed);
    height: 50px;
}

.search-engine__icon {
    width: 24px;
    height: 24px;
    margin-right: 0.1rem;
    object-fit: contain;
}

.search-input {
    flex: 1;
    padding: 0.875rem 3.5rem 0.875rem 0rem;
    border: none;
    border-radius: 0 2rem 2rem 0;
    font-size: 1rem;
    background: var(--white-80);
    transition: background var(--transition-speed);
    height: 50px;
    font-weight: 300;
}

.search-input:focus {
    outline: none;

}

.search-btn-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    cursor: pointer;
}

/* 导航栏 */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--nav-width);
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    z-index: 100;
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding-top: 64px;
}

.nav__item {
    width: 100%;
    height: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.nav__item svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.nav__item span {
    font-size: 0.75rem;
    font-weight: 300;
}

.nav__item--active {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

/* 内容区域 */
.content {
    display: grid;
    gap: 1.25rem;
    max-width: 1100px;
    margin: 0 auto;
}

.content-panel {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

.content-panel--active {
    display: grid;
}

/* 卡片样式 */
.card {
    background: rgba(255, 255, 255, 0.85);
    border-radius: var(--card-radius);
    padding: 0.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    min-width: 0;
}

.card>div {
    min-width: 0;
    width: calc(100% - 32px);
}

.card__logo {
    width: 32px;
    height: 32px;
    border-radius: 0.75rem;
    object-fit: contain;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.card__title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.1rem;
    color: #1a1a1a;
}

.card__desc {
    font-size: 0.7rem;
    color: #666;
    line-height: 1.4;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* 下拉菜单 */
.dropdown {
    display: none;
    position: absolute;
    top: 51px;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-md);
    padding: 0.5rem 0.75rem;
    backdrop-filter: blur(8px);
    z-index: 200;
}

.dropdown--visible {
    display: flex;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

.dropdown-item {
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dropdown-item img {
    width: 24px;
    height: 24px;
    margin-bottom: 0.1rem;
}

.dropdown-item span {
    font-size: 0.875rem;
    color: #333;
}

/* 关于图标样式 */
.about-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    width: 24px;
    height: 24px;
}

/* 关于对话框样式 */
.about-dialog {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    background: #eee;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    z-index: 1000;
    padding: 20px;
    text-align: center;
    overflow: hidden;
}

.about-dialog h2 {
    margin-bottom: 16px;
    font-size: 18px;
    color: #333;
}

.about-dialog p {
    font-size: 14px;
    color: #666;
    text-align: left;
    text-indent: 2em;
}

.about-author,
.about-time {
    font-size: 14px;
    color: #666;
    margin-right: 20px;
    text-align: right;
}

.about-author {
    margin-top: 10px;
}

.about-time {
    margin-bottom: 10px;
}

.about-dialog button {
    padding: 8px 16px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.about-dialog button:hover {
    background: #0056b3;
}

/* 遮罩层 */
.about-dialog::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    z-index: -1;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .nav {
        bottom: 0;
        top: auto;
        width: 100%;
        height: 60px;
        flex-direction: row;
        padding: 0;
        background: rgba(255, 255, 255, 0.2);
    }

    .nav__item {
        height: 60px;
        padding: 0.5rem;
    }

    .nav__item span {
        display: none;
    }

    .time-hms {
        font-size: 3.5rem;
    }

    .content {
        margin-top: 80px;
        padding: 1rem;
    }

    .search-box {
        margin-bottom: 1rem;
    }
}